#define _CRT_SECURE_NO_WARNINGS
#include "DulList.h"

void test1() {
	Node* phead = DulListInit();
	DulListPushBack(phead,1);
	DulListPushBack(phead,2);
	DulListPushBack(phead,3);
	DulListPushBack(phead,4);
	DulListPrint(phead);
	DulListPopBack(phead);
	DulListPrint(phead);
}

void test2() {
	Node* phead = DulListInit();
	DulListPushFront(phead, 1);
	DulListPushFront(phead, 2);
	DulListPushFront(phead, 3);
	DulListPushFront(phead, 4);
	DulListPrint(phead);
	DulListPopFront(phead);
	DulListPrint(phead);
}

void test3() {
	Node* phead = DulListInit();
	DulListPushBack(phead, 1);
	DulListPushBack(phead, 2);
	DulListPushBack(phead, 3);
	DulListPushBack(phead, 4);
	DulListPrint(phead);
	Node* find = DulListFind(phead,3);
	printf("%d\n",find->data);
	DulListInsert(find, 100);
	DulListPrint(phead);
	DulListErase(find->prev);
	DulListPrint(phead);
	DulListDestroy(phead);
	phead = NULL;
}

int main() {
	//test1();
	//test2();
	test3();
	return 0;
}